package main

type Pet struct {
	Age int
	MasterName string
}

func (self Pet) GetAge() int {
	return self.Age
}

type Cat struct {//Dog结构体
	Animal
	Pet
}

func (self Cat) GetAge() int {
	return self.Pet.Age
}

func main() {
	cat:=new(Cat)
	cat.GetAge()
	cat.Pet.GetAge()
}
